package application.common.cron4j;

import com.jfinal.kit.StrKit;
import com.jfinal.plugin.cron4j.ITask;
import application.common.util.S3Util;
import application.common.util.ShiroUtil;

public class VideoTask implements ITask{
	
	private boolean isEnd=true;
	
	public void run() {
		if(isEnd) {
			if(ShiroUtil.getConfig()!=null && !StrKit.isBlank(ShiroUtil.getConfig().getId())) {
				isEnd=false;
				try {
					S3Util.upload();
				}catch (Exception e) {
					isEnd=true;
				}
			}
			isEnd=true;
		}
	}

	public void stop() {
	}

}
